FROM golang:1.17-alpine3.14 as build
WORKDIR /apps
COPY . /apps
RUN go mod download && go build ./cmd/simple-httpserver

FROM alpine:3.14
COPY --from=build /apps/simple-httpserver ./
EXPOSE 8000
CMD ["./simple-httpserver"]